package com.steak.orm.service.impl;

import com.steak.orm.factory.SQLBuilderInstanceFactory;
import com.steak.orm.service.IUpdate;
import com.steak.orm.datasource.JdbcTemplate;

import java.util.List;

/**
 * @author 刘牌
 * @Title:
 * @date 2022/3/411:34
 */
public class Update<T> extends JdbcTemplate implements IUpdate<T> {
    @Override
    public int update(T t) throws Exception {
        String updateSql = SQLBuilderInstanceFactory.getUpdateBuilder().updateSql(t);
        return executeUpdate(updateSql);
    }

    @Override
    public void updateBatch(List<T> ts) {

    }
}
